# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm
import os

names = ['miuzg','trickfromet','hemo']

# 生成名字命名的文件夹，就算存在也不报错
for name in names:
    os.makedirs(name,exist_ok=True)

# 生成文件
for name in names:
    with open(f'{names}.txt','w',encoding='utf-8'):
        pass

# 用户文件夹中生成文件
for name in names:
    with open(f'{name}\{name}.txt', 'w', encoding='utf-8'):
        pass
